<template>
  <div>
    <div class="item" v-for="(item,index) of list" :key="index">
      <div class="item-title">
        <span class="icon iconfont icon-jingdianmenpiao"></span>
        <div>{{item.title}}</div>
      </div>
      <div v-if="item.children" class="item-children">
        <detail-list :list="item.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'DetailList',
  props: {
    list: Array
  }
}
</script>

<style scoped>
.item-title{
  line-height: 40px;
  font-size: 16px;
  padding: 0 10px;
  border-bottom: 1px solid #ccc;
  overflow: hidden;
}
.icon-jingdianmenpiao{
  display: block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  font-size: 22px;
  float: left;
  text-align: center;
  color: #00bcd4;
}
.item-children{
  padding: 0 10px;
}
</style>
